package com.zjsystem.zjsy.vo;

import com.google.common.collect.Lists;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: 王云飞
 * @name: Node
 * @Date: 2024/7/8 14:20
 */
@Data
public class Node implements Serializable {

    public static final long serialVersionUID = 1L;

    private String deptId;
    private String name;
    private String pId;
    private List<Node> child = Lists.newArrayList();

    public Node(String deptId, String name, String pId) {
        this.deptId = deptId;
        this.name = name;
        this.pId = pId;
    }

    public void addChild(Node node){
        child.add(node);
    }

}
